package com.itheima.project;

import com.itheima.project.pojo.Customer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * @Description：json格式
 */
@Controller
@RequestMapping("json-type")
public class JsonTypeController {

    @RequestMapping
    @ResponseBody
    public Customer defaultMethod(){
        Customer customer = new Customer();
        customer.setCustId(1001);
        customer.setCustName("小王");
        customer.setCustLevel("普通客户");
        customer.setCustPhone("15156400000");
        customer.setCustAddress("上海");
        customer.setCreaterTime(new Date());
        customer.setCustIndustry("IT");
        customer.setCustSource("黑马");
        return customer;
    }
}
